package sng.modules.view.components.city.state
{
	import sng.modules.view.components.city.logic.City;
	import sng.modules.view.components.city.logic.unit.BaseBuilding;

	
	/**
	 * 
	 * @author leonliu
	 * 浏览好友的模式
	 * 
	 */	
	public class CityFriendState implements ICityState
	{
		public function CityFriendState(_city:City)
		{
			city=_city;
		}
		public var city:City;
		
		public function Execute(parameter:*=null):void
		{
			//禁止所有末授权的操作,只有收获状态才能操作
			if (city.currentBuilding.currentState.getiStateType()==EnumBuildState.GATHER_STATE)
			{
				city.currentBuilding.currentState.execute(city.currentBuilding);
			}
			
		}
			public function toString():String
			{
				return "CityFriendState";
			}
	}
}